﻿<UserControl x:Class="BillsManager.Views.DBView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:Caliburn="http://www.caliburnproject.org"
             xmlns:Controls="clr-namespace:BillsManager.Views.Controls"
             xmlns:ViewModels="clr-namespace:BillsManager.ViewModels;assembly=BillsManager.ViewModels"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             Caliburn:Bind.AtDesignTime="True"
             d:DataContext="{d:DesignInstance Type=ViewModels:DBViewModel,
                                              IsDesignTimeCreatable=True}"
             d:DesignHeight="200"
             d:DesignWidth="700"
             mc:Ignorable="d">

    <UserControl.Resources>
        <!--<ResourceDictionary Source="Dictionaries\Styles.xaml" />-->
        <ResourceDictionary Source="Themes\Themes.xaml" />
    </UserControl.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="{StaticResource View.Region.Spacing.Small}" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="{StaticResource View.Region.Spacing.Small}" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="{StaticResource View.Region.Spacing.Small}" />
            <ColumnDefinition />
            <!--<ColumnDefinition Width="{StaticResource View.Region.Spacing.Small}" />-->
        </Grid.ColumnDefinitions>

        <ContentControl x:Name="SearchSuppliersViewModel"
                        Grid.Column="1"
                        Visibility="{Binding ShowFilters,
                                             Converter={StaticResource BooleanToVisibilityConverter}}">
            <ContentControl.Margin>
                <Thickness Bottom="{StaticResource View.MarginSize.Value}" />
            </ContentControl.Margin>
        </ContentControl>

        <!--
            <GridSplitter Grid.Row="1"
            Grid.ColumnSpan="3"
            VerticalAlignment="Stretch" />
        -->

        <ContentControl x:Name="SearchBillsViewModel"
                        Grid.Column="3"
                        Visibility="{Binding ShowFilters,
                                             Converter={StaticResource BooleanToVisibilityConverter}}">
            <ContentControl.Margin>
                <Thickness Bottom="{StaticResource View.MarginSize.Value}" />
            </ContentControl.Margin>
        </ContentControl>

        <ContentControl x:Name="SuppliersViewModel"
                        Grid.Row="2"
                        Grid.Column="1" />

        <!--
            <Controls:GridSplitterEx Grid.Column="1"
            Grid.RowSpan="3"
            VerticalAlignment="Stretch" />
        -->

        <!--<Rectangle Grid.Row="1"
                   Grid.ColumnSpan="4"
                   Height="{StaticResource Separator.Size}"
                   Margin="0 8 0 1"
                   Fill="{StaticResource View.Foreground.Disabled}" />-->

        <ContentControl x:Name="BillsViewModel"
                        Grid.Row="2"
                        Grid.Column="3" />

    </Grid>
</UserControl>